﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using STS.Common;
using STS.Schema.Enums;
using STS.Interfaces;
using STS.Schema.Base;

namespace STS.Schema.Interfaces
{
    public interface ISchemaFactory
    {
        List<STSMessage> Messages { get; }
        DbServer Server { get; }

        ISqlObjectCollection GetObjectList<T>(ISqlObject parent = null, SqlObjectType? sqlObjectType = null, IDatabase database = null)
           where T : class, ISqlObject, new();

        void ClearObjectList<T>(IDatabase database = null) where T : class, ISqlObject, new();

        ISqlObject GetObject<T>(string name, ISqlObject parent = null, IDatabase database = null)
            where T : class, ISqlObject, new();

        ISqlObject GetObject<T>(int id, ISqlObject parent = null, IDatabase database = null)
            where T : class, ISqlObject, new();

        Type GetSqlObjectType(SqlObjectType sqlObjectType);

        ISqlObjectCollection GetCollection<T>(ISqlObject parent = null) where T : class, ISqlObject, new();
    }
}
